package com.ruoyi.web.controller.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.system.domain.vo.AppletLoginVO;
import com.ruoyi.system.service.LoginApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ProjectName: back
 * @Package: com.ruoyi.web.controller.api
 * @ClassName: LoginController
 * @Author: haiyue
 * @Description: 登录
 * @Date: 2025/5/14 上午 10:12:40
 * @Version: 1.0
 */
@Api(description = "登录管理--小程序使用")
@RestController
@RequestMapping("/api")
public class LoginApiController {


    @Autowired
    private SysLoginService loginService;


    @ApiOperation("小程序登录")
    @PostMapping("/appletLogin")
    public AjaxResult login(@RequestBody AppletLoginVO appletLoginVO)
    {
        // 生成令牌
        return loginService.appletLogin(appletLoginVO);
    }
}
